// @表示src目录
// import 是ES6的模块语法，引入模块
import http from "@/http/http";

const url = "dormAdmins";

export default {
    getListByPage: function(data, params) {
        return http.post(`${url}/list.do`, data, {
            params
        });
    },
    findUsernameByDormId: function(params) {
        return http.get(`${url}/findUsernameByDormId.do`, {
            params
        });
    },
    del: function(id) {
        return http.get("dormAdmins/del.do", {
            params: {
                id
            }
        });
    },
    delBatch: function(ids) {
        return http.get("dormAdmins/delBatch.do", {
            params: {
                ids
            }
        });
    },
    save: function(data) {
        return http.post("dormAdmins/save.do", data);
    },
    edit: function(id) {
        return http.get("dormAdmins/edit.do", {
            params: {
                id
            }
        });
    }
}